<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
        <head>
          <title>akka.actor.FSM</title>
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
          
      <link type="text/css" media="screen" rel="stylesheet" href="../../lib/template.css" />
      <script type="text/javascript" src="../../lib/jquery.js"></script>
      <script type="text/javascript" src="../../lib/jquery-ui.js"></script>
      <script type="text/javascript" src="../../lib/template.js"></script>
      <script type="text/javascript" src="../../lib/tools.tooltip.js"></script>
    
        </head>
        <body class="type">
      <div id="definition">
        <a title="Go to companion" href="FSM$.html"><img src="../../lib/trait_to_object_big.png" /></a>
        <p id="owner"><a name="akka" class="extype" href="../package.html">akka</a>.<a name="akka.actor" class="extype" href="package.html">actor</a></p>
        <h1><a title="Go to companion" href="FSM$.html">FSM</a></h1>
      </div>

      <h4 class="signature" id="signature">
      <span class="kind">trait</span>
      <span class="symbol">
        <span class="name">FSM</span>
        <span class="tparams">[<span name="S">S</span>, <span name="D">D</span>]</span>
        <span class="result"> extends <a name="akka.routing.Listeners" class="extype" href="../routing/Listeners.html">Listeners</a></span>
      </span>
      </h4>
      
          <div class="fullcommenttop" id="comment"><div class="comment cmt"><p>Finite State Machine actor trait. Use as follows:</p><p><pre>
  object A {
    trait State
    case class One extends State
    case class Two extends State

    case class Data(i : Int)
  }

  class A extends Actor with FSM[A.State, A.Data] {
    import A._

    startWith(One, Data(42))
    when(One) {
        case Event(SomeMsg, Data(x)) => ...
        case Ev(SomeMsg) => ... // convenience when data not needed
    }
    when(Two, stateTimeout = 5 seconds) { ... }
    initialize
  }
</pre></p><p>Within the partial function the following values are returned for effecting
state transitions:</p><ul><li><code>stay</code> for staying in the same state</li><li><code>stay using Data(...)</code> for staying in the same state, but with
   different data</li><li><code>stay forMax 5.millis</code> for staying with a state timeout; can be
   combined with <code>using</code></li><li><code>goto(...)</code> for changing into a different state; also supports
   <code>using</code> and <code>forMax</code></li><li><code>stop</code> for terminating this FSM actor</li></ul><p>Each of the above also supports the method <code>replying(AnyRef)</code> for
sending a reply before changing state.</p><p>While changing state, custom handlers may be invoked which are registered
using <code>onTransition</code>. This is meant to enable concentrating
different concerns in different places; you may choose to use
<code>when</code> for describing the properties of a state, including of
course initiating transitions, but you can describe the transitions using
<code>onTransition</code> to avoid having to duplicate that code among
multiple paths which lead to a transition:</p><p><pre>
onTransition {
  case Active -&gt; _ =&gt; cancelTimer("activeTimer")
}
</pre></p><p>Multiple such blocks are supported and all of them will be called, not only
the first matching one.</p><p>Another feature is that other actors may subscribe for transition events by
sending a <code>SubscribeTransitionCallback</code> message to this actor;
use <code>UnsubscribeTransitionCallback</code> before stopping the other
actor.</p><p>State timeouts set an upper bound to the time which may pass before another
message is received in the current state. If no external message is
available, then upon expiry of the timeout a StateTimeout message is sent.
Note that this message will only be received in the state for which the
timeout was set and that any message received will cancel the timeout
(possibly to be started again by the next transition).</p><p>Another feature is the ability to install and cancel single-shot as well as
repeated timers which arrange for the sending of a user-specified message:</p><p><pre>
  setTimer("tock", TockMsg, 1 second, true) // repeating
  setTimer("lifetime", TerminateMsg, 1 hour, false) // single-shot
  cancelTimer("tock")
  timerActive_? ("tock")
</pre>
</p></div><dl class="attributes block"> <dt>Self Type</dt><dd><a name="akka.actor.FSM" class="extype" href="">FSM</a>[S, D] with <a name="akka.actor.Actor" class="extype" href="Actor.html">Actor</a></dd></dl><div class="toggleContainer block">
          <span class="toggle">Linear Supertypes</span>
          <div class="superTypes hiddenContent"><a name="akka.routing.Listeners" class="extype" href="../routing/Listeners.html">Listeners</a>, AnyRef, <span name="scala.Any" class="extype">Any</span></div>
        </div><div class="toggleContainer block">
          <span class="toggle">Known Subclasses</span>
          <div class="subClasses hiddenContent"><a name="akka.actor.LoggingFSM" class="extype" href="LoggingFSM.html">LoggingFSM</a></div>
        </div></div>
        

      <div id="template">

        <div id="mbrsel">
          <div id="textfilter"><span class="pre"></span><span class="input"><input accesskey="/" type="text" /></span><span class="post"></span></div>
          <div id="order">
                <span class="filtertype">Ordering</span>
                <ol><li class="alpha in"><span>Alphabetic</span></li><li class="inherit out"><span>By inheritance</span></li></ol>
              </div>
          <div id="ancestors">
                <span class="filtertype">Inherited</span>
                <ol><li class="hideall out"><span>Hide All</span></li>
                <li class="showall in"><span>Show all</span></li></ol>
                <ol id="linearization"><li name="akka.actor.FSM" class="in"><span>FSM</span></li><li name="akka.routing.Listeners" class="in"><span>Listeners</span></li><li name="scala.AnyRef" class="in"><span>AnyRef</span></li><li name="scala.Any" class="in"><span>Any</span></li></ol>
              </div>
          <div id="visbl">
              <span class="filtertype">Visibility</span>
              <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol>
            </div>
        </div>

        

        <div class="types members" id="types">
              <h3>Type Members</h3>
              <ol><li visbl="pub" name="akka.actor.FSM.Event" data-isabs="false">
      <a id="Event:Event"></a>
      <h4 class="signature">
      <span class="kind">case class</span>
      <span class="symbol">
        <a href="FSM$Event.html"><span class="name">Event</span></a>
        
        <span class="params">(<span name="event">event: Any</span>, <span name="stateData">stateData: D</span>)</span><span class="result"> extends Product with Serializable</span>
      </span>
      </h4>
      
    </li><li visbl="pub" name="akka.actor.FSM#State" data-isabs="false">
      <a id="State:State"></a>
      <h4 class="signature">
      <span class="kind">type</span>
      <span class="symbol">
        <span class="name">State</span>
        
        <span class="result"> = <a name="akka.actor.FSM.State" class="extype" href="FSM$$State.html">State</a>[S, D]</span>
      </span>
      </h4>
      
    </li><li visbl="pub" name="akka.actor.FSM#StateFunction" data-isabs="false">
      <a id="StateFunction:StateFunction"></a>
      <h4 class="signature">
      <span class="kind">type</span>
      <span class="symbol">
        <span class="name">StateFunction</span>
        
        <span class="result"> = <span name="scala.PartialFunction" class="extype">PartialFunction</span>[<a name="akka.actor.FSM.Event" class="extype" href="FSM$Event.html">Event</a>, State]</span>
      </span>
      </h4>
      
    </li><li visbl="pub" name="akka.actor.FSM.StopEvent" data-isabs="false">
      <a id="StopEvent:StopEvent[S, D]"></a>
      <h4 class="signature">
      <span class="kind">case class</span>
      <span class="symbol">
        <a href="FSM$StopEvent.html"><span class="name">StopEvent</span></a>
        <span class="tparams">[<span name="S">S</span>, <span name="D">D</span>]</span>
        <span class="params">(<span name="reason">reason: Reason</span>, <span name="currentState">currentState: S</span>, <span name="stateData">stateData: D</span>)</span><span class="result"> extends Product with Serializable</span>
      </span>
      </h4>
      
    </li><li visbl="pub" name="akka.actor.FSM#Timeout" data-isabs="false">
      <a id="Timeout:Timeout"></a>
      <h4 class="signature">
      <span class="kind">type</span>
      <span class="symbol">
        <span class="name">Timeout</span>
        
        <span class="result"> = <span name="scala.Option" class="extype">Option</span>[<a name="akka.util.Duration" class="extype" href="../util/Duration.html">Duration</a>]</span>
      </span>
      </h4>
      
    </li><li visbl="pub" name="akka.actor.FSM#TransitionHandler" data-isabs="false">
      <a id="TransitionHandler:TransitionHandler"></a>
      <h4 class="signature">
      <span class="kind">type</span>
      <span class="symbol">
        <span class="name">TransitionHandler</span>
        
        <span class="result"> = <span name="scala.PartialFunction" class="extype">PartialFunction</span>[(S, S), <span name="scala.Unit" class="extype">Unit</span>]</span>
      </span>
      </h4>
      
    </li></ol>
            </div>

        

        <div class="values members" id="values">
              <h3>Value Members</h3>
              <ol><li visbl="pub" name="scala.AnyRef#!=" data-isabs="false">
      <a id="!=(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">!=</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.Any#!=" data-isabs="false">
      <a id="!=(Any):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">!=</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef###" data-isabs="false">
      <a id="##():Int"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">##</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="pub" name="akka.actor.FSM#-&gt;" data-isabs="false">
      <a id="-&gt;:akka.actor.FSM.-&gt;.type"></a>
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">-&gt;</span>
        
        <span class="result">: akka.actor.FSM.-&gt;.type</span>
      </span>
      </h4>
      
    </li><li visbl="pub" name="scala.AnyRef#==" data-isabs="false">
      <a id="==(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">==</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.Any#==" data-isabs="false">
      <a id="==(Any):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">==</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="akka.actor.FSM#StateTimeout" data-isabs="false">
      <a id="StateTimeout:akka.actor.FSM.StateTimeout.type"></a>
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">StateTimeout</span>
        
        <span class="result">: akka.actor.FSM.StateTimeout.type</span>
      </span>
      </h4>
      
    </li><li visbl="pub" name="scala.Any#asInstanceOf" data-isabs="false">
      <a id="asInstanceOf[T0]:T0"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">asInstanceOf</span>
        <span class="tparams">[<span name="T0">T0</span>]</span>
        <span class="result">: T0</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#cancelTimer" data-isabs="false">
      <a id="cancelTimer(String):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">cancelTimer</span>
        
        <span class="params">(<span name="name">name: String</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Cancel named timer, ensuring that the message is not subsequently delivered (no race).</p><div class="fullcomment"><div class="comment cmt"><p>Cancel named timer, ensuring that the message is not subsequently delivered (no race).</p></div><dl class="paramcmts block"><dt class="param">name</dt><dd class="cmt"><p>of the timer to cancel
</p></dd></dl><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="akka" class="extype" href="../package.html">akka</a>] </dd></dl></div>
    </li><li visbl="prt" name="scala.AnyRef#clone" data-isabs="false">
      <a id="clone():AnyRef"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">clone</span>
        
        <span class="params">()</span><span class="result">: AnyRef</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="java.lang" class="extype" href="../../java/lang/package.html">lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#eq" data-isabs="false">
      <a id="eq(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">eq</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#equals" data-isabs="false">
      <a id="equals(Any):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">equals</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="prt" name="scala.AnyRef#finalize" data-isabs="false">
      <a id="finalize():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">finalize</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="java.lang" class="extype" href="../../java/lang/package.html">lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#getClass" data-isabs="false">
      <a id="getClass():java.lang.Class[_]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">getClass</span>
        
        <span class="params">()</span><span class="result">: java.lang.Class[_]</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="prt" name="akka.routing.Listeners#gossip" data-isabs="false">
      <a id="gossip(Any):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">gossip</span>
        
        <span class="params">(<span name="msg">msg: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected </dd><dt>Definition Classes</dt><dd><a name="akka.routing.Listeners" class="extype" href="../routing/Listeners.html">Listeners</a></dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#goto" data-isabs="false">
      <a id="goto(S):State"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">goto</span>
        
        <span class="params">(<span name="nextStateName">nextStateName: S</span>)</span><span class="result">: State</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Produce transition to other state.</p><div class="fullcomment"><div class="comment cmt"><p>Produce transition to other state. Return this from a state function in
order to effect the transition.
</p></div><dl class="paramcmts block"><dt class="param">nextStateName</dt><dd class="cmt"><p>state designator for the next state</p></dd><dt>returns</dt><dd class="cmt"><p>state transition descriptor
</p></dd></dl><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#hashCode" data-isabs="false">
      <a id="hashCode():Int"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">hashCode</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#initialize" data-isabs="false">
      <a id="initialize:Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">initialize</span>
        
        <span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Verify existence of initial state and setup timers.</p><div class="fullcomment"><div class="comment cmt"><p>Verify existence of initial state and setup timers. This should be the
last call within the constructor.
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="pub" name="scala.Any#isInstanceOf" data-isabs="false">
      <a id="isInstanceOf[T0]:Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">isInstanceOf</span>
        <span class="tparams">[<span name="T0">T0</span>]</span>
        <span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="prt" name="akka.routing.Listeners#listenerManagement" data-isabs="false">
      <a id="listenerManagement:Receive"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">listenerManagement</span>
        
        <span class="result">: Receive</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected </dd><dt>Definition Classes</dt><dd><a name="akka.routing.Listeners" class="extype" href="../routing/Listeners.html">Listeners</a></dd></dl></div>
    </li><li visbl="prt" name="akka.routing.Listeners#listeners" data-isabs="false">
      <a id="listeners:ConcurrentSkipListSet[ActorRef]"></a>
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">listeners</span>
        
        <span class="result">: <span name="java.util.concurrent.ConcurrentSkipListSet" class="extype">ConcurrentSkipListSet</span>[<a name="akka.actor.ActorRef" class="extype" href="ActorRef.html">ActorRef</a>]</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected </dd><dt>Definition Classes</dt><dd><a name="akka.routing.Listeners" class="extype" href="../routing/Listeners.html">Listeners</a></dd></dl></div>
    </li><li visbl="pub" name="akka.actor.FSM#log" data-isabs="false">
      <a id="log:LoggingAdapter"></a>
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">log</span>
        
        <span class="result">: <a name="akka.event.LoggingAdapter" class="extype" href="../event/LoggingAdapter.html">LoggingAdapter</a></span>
      </span>
      </h4>
      
    </li><li visbl="pub" name="scala.AnyRef#ne" data-isabs="false">
      <a id="ne(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">ne</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#nextStateData" data-isabs="false">
      <a id="nextStateData:D"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">nextStateData</span>
        
        <span class="result">: D</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Return next state data (available in onTransition handlers)
</p><div class="fullcomment"><div class="comment cmt"><p>Return next state data (available in onTransition handlers)
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="akka" class="extype" href="../package.html">akka</a>] </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#notify" data-isabs="false">
      <a id="notify():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">notify</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#notifyAll" data-isabs="false">
      <a id="notifyAll():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">notifyAll</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#onTermination" data-isabs="false">
      <a id="onTermination(PartialFunction[StopEvent[S, D], Unit]):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">onTermination</span>
        
        <span class="params">(<span name="terminationHandler">terminationHandler: <span name="scala.PartialFunction" class="extype">PartialFunction</span>[<a name="akka.actor.FSM.StopEvent" class="extype" href="FSM$StopEvent.html">StopEvent</a>[S, D], <span name="scala.Unit" class="extype">Unit</span>]</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Set handler which is called upon termination of this FSM actor.</p><div class="fullcomment"><div class="comment cmt"><p>Set handler which is called upon termination of this FSM actor.
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#onTransition" data-isabs="false">
      <a id="onTransition(TransitionHandler):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">onTransition</span>
        
        <span class="params">(<span name="transitionHandler">transitionHandler: TransitionHandler</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Set handler which is called upon each state transition, i.</p><div class="fullcomment"><div class="comment cmt"><p>Set handler which is called upon each state transition, i.e. not when
staying in the same state. This may use the pair extractor defined in the
FSM companion object like so:</p><p><pre>
onTransition {
  case Old -&gt; New =&gt; doSomething
}
</pre></p><p>It is also possible to supply a 2-ary function object:</p><p><pre>
onTransition(handler _)

private def handler(from: S, to: S) { ... }
</pre></p><p>The underscore is unfortunately necessary to enable the nicer syntax shown
above (it uses the implicit conversion total2pf under the hood).</p><p><b>Multiple handlers may be installed, and every one of them will be
called, not only the first one matching.</b>
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="pub" name="akka.actor.FSM#postStop" data-isabs="false">
      <a id="postStop():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">postStop</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      
    </li><li visbl="prt" name="akka.actor.FSM#receive" data-isabs="false">
      <a id="receive:Receive"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">receive</span>
        
        <span class="result">: Receive</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#setStateTimeout" data-isabs="false">
      <a id="setStateTimeout(S,Timeout):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">setStateTimeout</span>
        
        <span class="params">(<span name="state">state: S</span>, <span name="timeout">timeout: Timeout</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Set state timeout explicitly.</p><div class="fullcomment"><div class="comment cmt"><p>Set state timeout explicitly. This method can safely be used from within a
state handler.
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#setTimer" data-isabs="false">
      <a id="setTimer(String,Any,Duration,Boolean):State"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">setTimer</span>
        
        <span class="params">(<span name="name">name: String</span>, <span name="msg">msg: <span name="scala.Any" class="extype">Any</span></span>, <span name="timeout">timeout: <a name="akka.util.Duration" class="extype" href="../util/Duration.html">Duration</a></span>, <span name="repeat">repeat: <span name="scala.Boolean" class="extype">Boolean</span></span>)</span><span class="result">: State</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Schedule named timer to deliver message after given delay, possibly repeating.</p><div class="fullcomment"><div class="comment cmt"><p>Schedule named timer to deliver message after given delay, possibly repeating.</p></div><dl class="paramcmts block"><dt class="param">name</dt><dd class="cmt"><p>identifier to be used with cancelTimer()</p></dd><dt class="param">msg</dt><dd class="cmt"><p>message to be delivered</p></dd><dt class="param">timeout</dt><dd class="cmt"><p>delay of first message delivery and between subsequent messages</p></dd><dt class="param">repeat</dt><dd class="cmt"><p>send once if false, scheduleAtFixedRate if true</p></dd><dt>returns</dt><dd class="cmt"><p>current state descriptor
</p></dd></dl><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="akka" class="extype" href="../package.html">akka</a>] </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#startWith" data-isabs="false">
      <a id="startWith(S,D,Timeout):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">startWith</span>
        
        <span class="params">(<span name="stateName">stateName: S</span>, <span name="stateData">stateData: D</span>, <span name="timeout">timeout: Timeout = <span class="symbol"><span class="name"><a href="../../scala/package.html">None</a></span></span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Set initial state.</p><div class="fullcomment"><div class="comment cmt"><p>Set initial state. Call this method from the constructor before the #initialize method.
</p></div><dl class="paramcmts block"><dt class="param">stateName</dt><dd class="cmt"><p>initial state designator</p></dd><dt class="param">stateData</dt><dd class="cmt"><p>initial state data</p></dd><dt class="param">timeout</dt><dd class="cmt"><p>state timeout for the initial state, overriding the default timeout for that state
</p></dd></dl><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#stateData" data-isabs="false">
      <a id="stateData:D"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">stateData</span>
        
        <span class="result">: D</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Return current state data (i.</p><div class="fullcomment"><div class="comment cmt"><p>Return current state data (i.e. object of type D)
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="akka" class="extype" href="../package.html">akka</a>] </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#stateName" data-isabs="false">
      <a id="stateName:S"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">stateName</span>
        
        <span class="result">: S</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Return current state name (i.</p><div class="fullcomment"><div class="comment cmt"><p>Return current state name (i.e. object of type S)
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="akka" class="extype" href="../package.html">akka</a>] </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#stay" data-isabs="false">
      <a id="stay():State"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">stay</span>
        
        <span class="params">()</span><span class="result">: State</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Produce &quot;empty&quot; transition descriptor.</p><div class="fullcomment"><div class="comment cmt"><p>Produce &quot;empty&quot; transition descriptor. Return this from a state function
when no state change is to be effected.
</p></div><dl class="paramcmts block"><dt>returns</dt><dd class="cmt"><p>descriptor for staying in current state
</p></dd></dl><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#stop" data-isabs="false">
      <a id="stop(Reason,D):State"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">stop</span>
        
        <span class="params">(<span name="reason">reason: <a name="akka.actor.FSM.Reason" class="extype" href="FSM$$Reason.html">Reason</a></span>, <span name="stateData">stateData: D</span>)</span><span class="result">: State</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Produce change descriptor to stop this FSM actor including specified reason.</p><div class="fullcomment"><div class="comment cmt"><p>Produce change descriptor to stop this FSM actor including specified reason.
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#stop" data-isabs="false">
      <a id="stop(Reason):State"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">stop</span>
        
        <span class="params">(<span name="reason">reason: <a name="akka.actor.FSM.Reason" class="extype" href="FSM$$Reason.html">Reason</a></span>)</span><span class="result">: State</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Produce change descriptor to stop this FSM actor including specified reason.</p><div class="fullcomment"><div class="comment cmt"><p>Produce change descriptor to stop this FSM actor including specified reason.
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#stop" data-isabs="false">
      <a id="stop():State"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">stop</span>
        
        <span class="params">()</span><span class="result">: State</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Produce change descriptor to stop this FSM actor with reason &quot;Normal&quot;.</p><div class="fullcomment"><div class="comment cmt"><p>Produce change descriptor to stop this FSM actor with reason &quot;Normal&quot;.
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#synchronized" data-isabs="false">
      <a id="synchronized[T0](⇒ T0):T0"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">synchronized</span>
        <span class="tparams">[<span name="T0">T0</span>]</span>
        <span class="params">(<span name="arg0">arg0: ⇒ T0</span>)</span><span class="result">: T0</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#timerActive_?" data-isabs="false">
      <a id="timerActive_?(String):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">timerActive_?</span>
        
        <span class="params">(<span name="name">name: String</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Inquire whether the named timer is still active.</p><div class="fullcomment"><div class="comment cmt"><p>Inquire whether the named timer is still active. Returns true unless the
timer does not exist, has previously been canceled or if it was a
single-shot timer whose message was already received.
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="akka" class="extype" href="../package.html">akka</a>] final </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#toString" data-isabs="false">
      <a id="toString():String"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">toString</span>
        
        <span class="params">()</span><span class="result">: <span name="java.lang.String" class="extype">String</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#total2pf" data-isabs="false">
      <a id="total2pf((S, S) ⇒ Unit):PartialFunction[(S, S), Unit]"></a>
      <h4 class="signature">
      <span class="kind">implicit def</span>
      <span class="symbol">
        <span class="name">total2pf</span>
        
        <span class="params">(<span name="transitionHandler">transitionHandler: (S, S) ⇒ <span name="scala.Unit" class="extype">Unit</span></span>)</span><span class="result">: <span name="scala.PartialFunction" class="extype">PartialFunction</span>[(S, S), <span name="scala.Unit" class="extype">Unit</span>]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Convenience wrapper for using a total function instead of a partial
function literal.</p><div class="fullcomment"><div class="comment cmt"><p>Convenience wrapper for using a total function instead of a partial
function literal. To be used with onTransition.
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected implicit final </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
      <a id="wait():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">wait</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
      <a id="wait(Long,Int):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">wait</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Long" class="extype">Long</span></span>, <span name="arg1">arg1: <span name="scala.Int" class="extype">Int</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
      <a id="wait(Long):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">wait</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Long" class="extype">Long</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#when" data-isabs="false">
      <a id="when(S,Duration)(StateFunction):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">when</span>
        
        <span class="params">(<span name="stateName">stateName: S</span>, <span name="stateTimeout">stateTimeout: <a name="akka.util.Duration" class="extype" href="../util/Duration.html">Duration</a> = <span class="symbol">null</span></span>)</span><span class="params">(<span name="stateFunction">stateFunction: StateFunction</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Insert a new StateFunction at the end of the processing chain for the
given state.</p><div class="fullcomment"><div class="comment cmt"><p>Insert a new StateFunction at the end of the processing chain for the
given state. If the stateTimeout parameter is set, entering this state
without a differing explicit timeout setting will trigger a StateTimeout
event; the same is true when using #stay.
</p></div><dl class="paramcmts block"><dt class="param">stateName</dt><dd class="cmt"><p>designator for the state</p></dd><dt class="param">stateTimeout</dt><dd class="cmt"><p>default state timeout for this state</p></dd><dt class="param">stateFunction</dt><dd class="cmt"><p>partial function describing response to input
</p></dd></dl><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li><li visbl="prt" name="akka.actor.FSM#whenUnhandled" data-isabs="false">
      <a id="whenUnhandled(StateFunction):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">whenUnhandled</span>
        
        <span class="params">(<span name="stateFunction">stateFunction: StateFunction</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Set handler which is called upon reception of unhandled messages.</p><div class="fullcomment"><div class="comment cmt"><p>Set handler which is called upon reception of unhandled messages.
</p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd></dl></div>
    </li></ol>
            </div>

        <div class="values members" id="values">
              <h3>Deprecated Value Members</h3>
              <ol><li visbl="prt" name="akka.actor.FSM#when" data-isabs="false">
      <a id="when(S,Timeout)(StateFunction):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name deprecated">when</span>
        
        <span class="params">(<span name="stateName">stateName: S</span>, <span name="stateTimeout">stateTimeout: Timeout</span>)</span><span class="params">(<span name="stateFunction">stateFunction: StateFunction</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected final </dd><dt>Annotations</dt><dd>
                <span class="name">@deprecated</span>
              
        </dd><dt>Deprecated</dt><dd class="cmt"><p>use the more import-friendly variant taking a Duration</p></dd></dl></div>
    </li></ol>
            </div>

        <div name="akka.routing.Listeners" class="parent">
              <h3>Inherited from <a name="akka.routing.Listeners" class="extype" href="../routing/Listeners.html">Listeners</a></h3>
            </div><div name="scala.AnyRef" class="parent">
              <h3>Inherited from AnyRef</h3>
            </div><div name="scala.Any" class="parent">
              <h3>Inherited from <span name="scala.Any" class="extype">Any</span></h3>
            </div>

      </div>

      <div id="tooltip"></div>

    </body>
      </html>